﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CaroLibraly
{
    [Serializable]
    public class Room
    {
        public Player Owner { set; get; }
        public Player Rival { private set; get; }
        public string Name { set; get; }
        public string Password { set; get; }
        public bool Full { private set; get; }

        public Room(Player _ow, string _n, string _pw)
        {
            this.Owner = _ow;
            this.Name = _n;
            this.Password = _pw;
        }

        public Room()
        {
            this.Owner = new Player();
            this.Rival = new Player();
            this.Name = "Name";
            this.Password = "Pw";
            this.Full = false;
        }

        public void SetRival(Player _rival)
        {
            this.Rival = _rival;
            this.Full = true;
        }
    }
}
